import wx
import Banco

#from Cartao import Cartao
#from Repositorio import Armazenar
#from Arvore import Arvore

class PanelCadBanco(wx.Panel):
    def _init_ctrls(self, prnt):

        wx.Panel.__init__(self, id=-1, name='', parent=prnt, size=wx.Size(411, 213),
              style=wx.TAB_TRAVERSAL)
        self.SetClientSize(wx.Size(420, 320))

        self.parent = prnt

        self.labelCadastrarBanco = wx.StaticText(id=-1,
              label='Cadastrar Banco', name='staticText1', parent=self,
              pos=wx.Point(115, 2), size=wx.Size(107, 23), style=0)
        self.labelCadastrarBanco.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, 'Tahoma'))

        self.labelNome = wx.StaticText(id=-1, label='Nome: ',
              name='staticText1', parent=self, pos=wx.Point(40, 60),
              size=wx.Size(42, 14), style=0)
        self.labelNome.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.BOLD, False,
              'Tahoma'))

        #self.labelNumero = wx.StaticText(id=-1, label='Numero: ', name='staticText1',
        #      parent=self, pos=wx.Point(40, 38), size=wx.Size(42, 14), style=0)
        #self.labelNumero.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.BOLD, False,
        #      'Tahoma'))

        #self.labelBandeira = wx.StaticText(id=-1, label='Bandeira: ',
        #      name='staticText1', parent=self, pos=wx.Point(40, 82),
        #      size=wx.Size(43, 14), style=0)
        #self.labelBandeira.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.BOLD, False,
        #      'Tahoma'))

        
        #self.textBandeira = wx.TextCtrl(id=-1, name='textCtrl1', parent=self,
        #      pos=wx.Point(120, 82), size=wx.Size(192, 21), style=0)


        self.textNome = wx.TextCtrl(id=-1, name='textCtrl1', parent=self,
              pos=wx.Point(120, 60), size=wx.Size(192, 21), style=0)

        #self.textNumero = wx.TextCtrl(id=-1, name='textCtrl2', parent=self,
        #      pos=wx.Point(120, 38), size=wx.Size(192, 21), style=0)

        self.botaoCadastrar = wx.Button(id=11, label='Cadastrar',
              name='button1', parent=self, pos=wx.Point(240, 136),
              size=wx.Size(75, 23), style=0)

        

        self.Bind(wx.EVT_BUTTON, self.cadastrar, id=11)


    def cadastrar(self, event):
        banco = self.textNome.get

        mensagem = wx.MessageDialog(None, 'Banco Cadastrado', '',style = wx.OK)
        msg = mensagem.ShowModal()
        



    def __init__(self, parent):

        

        self._init_ctrls(parent)
        self.AcceptsFocus()
        self.Enable(True) 
